#ifndef _WORKER_H_INCLUDED_
#define _WORKER_H_INCLUDED_
#include "core.h"
const int default_buffer_size = 1024;
class worker
{
private:
    core_data_t& core_data;
    std::shared_ptr<spdlog::logger> logger;
    std::vector<char> buffer;
    int status;
public:
    inline worker(core_data_t& data):
    core_data(data), buffer(default_buffer_size){
        logger = core_data.logger.setBasicLogger("worker");
        status = 0;
    }
    void worker_cycle();
    void close_connection(connection_t* conn);
    void run();
};
//void worker_cycle(core_data_t& core_data, epoll_event event);

#endif